<template>
  <view class="consumer">
    <view style="padding: 40rpx 0">
      <consumer-card
        v-for="item in datalist"
        :key="item.id"
        class="card"
        :data="item"
      ></consumer-card>
    </view>
  </view>
</template>

<script>
import "./index.scss";
import Taro from "@tarojs/taro";
import consumerCard from "../../components/consumerCard/index";
import img1 from "../../assets/image/build1.png";
import request from "../../utils/request";

export default {
  components: {
    "consumer-card": consumerCard,
  },
  data() {
    return {
      list: [{ image: img1 }, { image: img1 }, { image: img1 }],
        datalist: [],
    };
  },
  created() {
    this.getList();
  },
  mounted() {},
  methods: {
getList(){
request("get","/api/rest/activity_batch.htm").then((res)=>{
  console.log(res,"33")
  this.datalist=res._list
})
},

    todetail(item) {
      Taro.navigateTo({ url: item.path });
    },
    // shopping_district
    // getDistrict() {
    //   request("get", "/api/rest/businesses/5cf47d251c4d3d2c0c215225.htm").then((res)=>{
    //     console.log(res,'getDistrict')
    //   });
    // },
  },
};
</script>
